package com.js.data.common.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode
public class BasePlusEntity<T extends Model> extends Model {

    @TableId(value = "ID", type = IdType.AUTO)
    protected Long id;

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    protected Long createBy;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    protected LocalDateTime createTime;

    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    protected Long updateBy;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    protected LocalDateTime updateTime;

    @TableLogic
    protected Integer delFlag;
}
